//
//  RCPSound.h
//  智能控制系统
//
//  Created by Rankin on 15/12/8.
//
//

#define RCP_CALLBACK_TYPE "cbType"
#define RCP_SOUND_SOURCE "soundSource"
#define RCP_COVER "cover"
#define RCP_EQ_MODEL "eqModel"
#define RCP_FLAG_LOCAL "flagLocal"
#define RCP_MUTE "mute"
#define RCP_PLAY_MODE "playMode"
#define RCP_TICK_COUNT_TMP "tickCountTmp"
#define RCP_VOLUME_CUR "volumeCur"
#define RCP_VOLUME_MAX "volumeMax"
#define RCP_VOLUME_TMP "volumeTmp"
#define RCP_PLAY_STATUS "playStatus"
#define RCP_ALUM_ID "alumId"
#define RCP_ARTIST "artist"
#define RCP_DURATION "duration"
#define RCP_MUSIC_ID "musicId"
#define RCP_MUSIC_NAME "musicName"
#define RCP_MUSIC_PATH "musicPath"
#define RCP_MUSIC_TIME "musicTime"
#define RCP_DLNA_UDN "dlnaUDN"
#define RCP_HOST_IP "hostIp"
#define RCP_HOST_PORT "hostPort"
#define RCP_IS_LINK_CTRL "isLinkCtrl"
#define RCP_IS_LINK_DLNA "isLinkDlna"
#define RCP_MAC "mac"
#define RCP_NAME "name"
#define RCP_NET_STATE "netState"
#define RCP_PLAYER "player"
#define RCP_TYPE "type"
#define NOTNULL(__POINTER) __POINTER ==nil? @"" : __POINTER

#import <Cordova/CDVPlugin.h>
#import <MusicPlayer/ConnectDev.h>
#import <MusicPlayer/PlayMusic.h>

#import <MusicPlayer/RoomItem.h>


@interface RCPSound : CDVPlugin
@property (nonatomic) NSMutableDictionary* RCPSoundItemsDic/* RCPSoundItem */;
@property (nonatomic) NSString* callbackId;
@property (nonatomic) ConnectDev* connectDev;
@property (nonatomic) NSTimer* timer;
@property (nonatomic) NSArray* soundSourceArr;


- (void)init:(CDVInvokedUrlCommand*)command;
- (void)getAllDevice:(CDVInvokedUrlCommand*)command;
- (void)switchSoundSource:(CDVInvokedUrlCommand*)command;
- (void)playResume:(CDVInvokedUrlCommand*)command;
- (void)playPause:(CDVInvokedUrlCommand*)command;
- (void)setPlayMode:(CDVInvokedUrlCommand*)command;
- (void)playPrev:(CDVInvokedUrlCommand*)command;
- (void)playNext:(CDVInvokedUrlCommand*)command;
- (void)setVolume:(CDVInvokedUrlCommand*)command;
- (void)setPlayProgress:(CDVInvokedUrlCommand*)command;
- (void)rename:(CDVInvokedUrlCommand*)command;
- (void)playMusicById:(CDVInvokedUrlCommand*)command;
- (void)addCurToFavorite:(CDVInvokedUrlCommand*)command;
- (void)allPlay:(CDVInvokedUrlCommand*)command;
- (void)allPause:(CDVInvokedUrlCommand*)command;
- (void)setEqMode:(CDVInvokedUrlCommand*)command;
- (void)startListen:(CDVInvokedUrlCommand*)command;
- (void)stopListen:(CDVInvokedUrlCommand*)command;
@end
